
<!-- radio -->
<div class="weui-cell__hd" ng-if="inputDefine.type=='radio'">
  <label for="" class="weui-label">{{inputDefine.desc}}</label>
</div>
<div class="weui-cell__bd" ng-if="inputDefine.type=='radio'">
  <select class="weui-select" name="input_{{inputDefine.name}}"
  ng-model='inputDefine.models[inputDefine.name]' 
  ng-change="inputDefine.onChange(inputDefine.name)"
  ng-required='inputDefine.required'
  ng-options='inputDefine.values[$index] for ($index, key) in inputDefine.keys '
  >
    <option value="">-- 请选择 --</option>
  </select>
</div>    

  
<!-- 1  cf.type =="mtext" -->  
<div class="weui-cell__bd" ng-if=' inputDefine.type =="mtext"'>
  <textarea class="weui-textarea"
    placeholder="{{inputDefine.placeholder}}" rows="3"
  name="input_{{inputDefine.name}}"
  ng-model="inputDefine.models[inputDefine.name]"
  ng-change="inputDefine.onChange(inputDefine.name)"
  maxlength='{{inputDefine.maxlength}}'
  ng-minlength='inputDefine.minlength'
  ></textarea>
  <div class="weui-textarea-counter"
  ng-if='inputDefine.models[inputDefine.name].length/inputDefine.maxlength > 0.9'
  ><span>{{inputDefine.models[inputDefine.name].length}}</span>/{{inputDefine.maxlength}}</div>
</div>

    
<!-- 4， cf.type = input -->  
<div class="weui-cell__hd" ng-if="inputDefine.type=='text'">
  <label class="weui-label">{{inputDefine.desc}}</label>
</div>
<div class="weui-cell__bd" ng-if="inputDefine.type=='text'">
  <input class="weui-input" type="input"
    placeholder="{{inputDefine.placeholder}}"
    name="input_{{inputDefine.name}}"
    ng-model='inputDefine.models[inputDefine.name]' 
    ng-change="inputDefine.onChange(inputDefine.name)"
    ng-required='inputDefine.required'
    ng-minlength="inputDefine.minlength"
    ng-maxlength="inputDefine.maxlength"
  >
</div>

<!-- 4a， cf.type = number -->  
<div class="weui-cell__hd" ng-if="inputDefine.type=='number'">
  <label class="weui-label">{{inputDefine.desc}}</label>
</div>
<div class="weui-cell__bd" ng-if="inputDefine.type=='number'">
  <input class="weui-input" type="number"
    placeholder="{{inputDefine.placeholder}}"
    name="input_{{inputDefine.name}}"
    ng-model='inputDefine.models[inputDefine.name]' 
    ng-change="inputDefine.onChange(inputDefine.name)"
    ng-required='inputDefine.required'
    ng-min="inputDefine.min"
    ng-max="inputDefine.max"
  >
</div>

<!-- 4b， cf.type = email -->  
<div class="weui-cell__hd" ng-if="inputDefine.type=='email'">
  <label class="weui-label">{{inputDefine.desc}}</label>
</div>
<div class="weui-cell__bd" ng-if="inputDefine.type=='email'">
  <input class="weui-input" type="email"
    placeholder="{{inputDefine.placeholder}}"
    name="input_{{inputDefine.name}}"
    ng-model='inputDefine.models[inputDefine.name]' 
    ng-change="inputDefine.onChange(inputDefine.name)"
    ng-required='inputDefine.required'
    ng-pattern='/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/'
  >
</div>

<!-- 4c， cf.type = tel -->  
<div class="weui-cell__hd" ng-if="inputDefine.type=='tel'">
  <label class="weui-label">{{inputDefine.desc}}</label>
</div>
<div class="weui-cell__bd" ng-if="inputDefine.type=='tel'">
  <input class="weui-input" type="text"
    placeholder="{{inputDefine.placeholder}}"
    name="input_{{inputDefine.name}}"
    ng-model='inputDefine.models[inputDefine.name]' 
    ng-change="inputDefine.onChange(inputDefine.name)"
    ng-required='inputDefine.required'
    ng-pattern='/(^(([0\+]\d{2,3}-?)?(0\d{2,3})-?)((\d{7,8})|(\d{3}-\d{4,5})|(\d{4}-\d{3,4}))(-(\d{1,}))?$)|(^0{0,1}1[3|4|5|6|7|8|9]\d-?((\d{8})|(\d{3}-\d{5})|(\d{4}-\d{4}))$)|(^400-?((\d{7})|(\d{3}-\d{4})|(\d{4}-\d{3}))(-\d{1,5})*$)/'
  >
</div>
